﻿using Microsoft.EntityFrameworkCore;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WheelClean2.Model
{
    /// <summary>
    /// 当前报警信息
    /// </summary>
   public class AlarmInfo : BindableBase
    {
     

        private int? _alarmID;
        /// <summary>
        /// ID
        /// </summary>
        [Key]
        public int? AlarmID
        {
            get { return _alarmID; }
            set { SetProperty(ref _alarmID, value); }
        }

        private string _alarmCode;
        /// <summary>
        /// 报警代码
        /// </summary>
        public string AlarmCode
        {
            get { return _alarmCode; }
            set { SetProperty(ref _alarmCode, value); }
        }
        private string _alarmName;
        /// <summary>
        /// 报警名称
        /// </summary>
        public string AlarmName
        {
            get { return _alarmName; }
            set { SetProperty(ref _alarmName, value); }
        }

        private int? _alarmType;
        /// <summary>
        ///报警类型(1:设备,2:工艺,3:安全等)
        /// </summary>
        public int? AlarmType
        {
            get { return _alarmType; }
            set { SetProperty(ref _alarmType, value); }
        }
        private int? _alarmLevel;
        /// <summary>
        ///报警级别(1:紧急,2:重要,3:一般,4:提示)
        /// </summary>
        public int? AlarmLevel
        {
            get { return _alarmLevel; }
            set { SetProperty(ref _alarmLevel, value); }
        }


        private string _description;
        /// <summary>
        /// 报警描述
        /// </summary>
        public string Description
        {
            get { return _description; }
            set { SetProperty(ref _description, value); }
        }
        private int? _threshold;
        /// <summary>
        ///报警阈值
        /// </summary>
        public int? Threshold
        {
            get { return _threshold; }
            set { SetProperty(ref _threshold, value); }
        }

        private string _solution;
        /// <summary>
        /// 建议解决方案
        /// </summary>
        public string Solution
        {
            get { return _solution; }
            set { SetProperty(ref _solution, value); }
        }
        private bool _isEnabled;
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled
        {
            get { return _isEnabled; }
            set { SetProperty(ref _isEnabled, value); }
        }


        public virtual ICollection<CurrentAlarm> CurrentAlarms { get; set; }


    }
}
